<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10.流程控制-分支结构.总练习1</title>
    <script>
        //判断时间阶段。
        //输入12点-中午好，输入18点-傍晚好，输入23点-深夜好
        var clock = prompt('请输入12/18/23');
        switch (clock) {
            case '12':
                alert('上午好');
                break;
            case '18':
                alert('傍晚好');
                break;
            case '23':
                alert('深夜好');
                break;
            default:
                alert('请输入12/18/23')
        }
    </script>
</head>

<body>

</body>

</html>